﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using QuestionSetLibrary;


namespace JsonDataWebApplication
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IDataService" in both code and config file together.
    [ServiceContract]
    public interface IQuestion
    {
        //[OperationContract]
        //[WebInvoke(Method = "GET",
        //                  ResponseFormat = WebMessageFormat.Json,
        //                  UriTemplate = "{questionSetName}/{id}")]
        //QuestionSet GetOneQuestion(string id);

        //user download a set of question in current choosed question package
        [OperationContract]
        [WebInvoke(Method = "GET",
                          ResponseFormat = WebMessageFormat.Json,
                          UriTemplate = "/{questionSetName}/All")]
        Question[] GetAllQuestion();
    }
}
